package other.nowcoder.easy;

import java.util.Scanner;

/**
 * @author bruin_du
 * @description 计算日期到天数转换
 * https://www.nowcoder.com/practice/769d45d455fe40b385ba32f97e7bcded?
 * tpId=37&&tqId=21296&rp=1&ru=/activity/oj&qru=/ta/huawei/question-ranking
 * @date 2022/5/11 19:48
 **/
public class DateToDays {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while(in.hasNextInt()){
            int year = in.nextInt();
            int month = in.nextInt();
            int day = in.nextInt();
            int[] days = new int[]{31,59,90,120,151,181,212,243,273,304,334};
            int countDay = day;
            if(month >= 2) {
                countDay += days[month - 2];
                if(month >= 3){
                    if(year % 400 == 0)
                        countDay += 1;
                    else if(year % 4 == 0 && year % 100 != 0){
                        countDay += 1;
                    }
                }
            }
            System.out.println(countDay);
        }
    }
}
